import QtQuick

Item {
  id: root
  width: 310
  height: 600

  property int ppeak: 28
  property real expMinVol:5.1
  property int vte: 346
  property int fTotal: 15

  Timer {
    running: true
    repeat: true
    interval: 100

    onTriggered: {
      var r = Math.floor(Math.random() * 4)
      if(r === 0){
        r = Math.floor(Math.random() * 3) - 1
          ppeak = ppeak + r
      }else if(r === 1){
      }else if(r === 2){
        r = Math.floor(Math.random() * 3) - 1
        vte = vte +r
      }else if(r === 3){
        r = Math.floor(Math.random() * 3) - 1
        fTotal = fTotal + r
      }
    }
  }

  Column {
    spacing: 10  // 相邻间距
    anchors.fill: parent

    Image {
        source: "qrc:///images/ppeak.png"

        Text {
            id: tv_ppeak
            text: root.ppeak.toString()
            anchors.top: parent.top
            anchors.left: parent.left
            anchors.topMargin: 15
            anchors.leftMargin: 10
            font.pixelSize: 58
            color: "white"
        }
    }

    Image {
        source: "qrc:///images/expminvol.png"

        Text {
            id: tv_exp
            text: root.expMinVol.toString()
            anchors.top: parent.top
            anchors.left: parent.left
            anchors.topMargin: 15
            anchors.leftMargin: 10
            font.pixelSize: 58
            color: "white"
        }
    }

    Image {
        source: "qrc:///images/vte.png"

        Text {
            id: tv_vte
            text: root.vte.toString()
            anchors.top: parent.top
            anchors.left: parent.left
            anchors.topMargin: 15
            anchors.leftMargin: 10
            font.pixelSize: 58
            color: "white"
        }
    }

    Image {
        source: "qrc:///images/ftotal.png"

        Text {
            id: tv_fTotal
            text: root.fTotal.toString()
            anchors.top: parent.top
            anchors.left: parent.left
            anchors.topMargin: 15
            anchors.leftMargin: 10
            font.pixelSize: 58
            color: "white"
        }
    }

  }

}
